//===============================================================================
// Microsoft patterns & practices Enterprise Library Contribution
// Query Application Block
//===============================================================================

using System.Data;

namespace EntLibContrib.Query
{
	/// <summary>
	/// This interface defines the contract that must be implemented by all commands. 
	/// </summary>
	public interface ICommand
	{
		#region Properties
		/// <summary>
		/// Gets the query parameters.
		/// </summary>
		/// <value>A dictionary of parameters.</value>
		ParameterDictionary Parameters
		{
			get;
		}
		#endregion

		#region Public Methods
		/// <summary>
		/// Executes a read command and returns the results.
		/// </summary>
		/// <returns>
		/// Dataset containing the results of the read operation
		/// </returns>
		/// <remarks>
		/// Output parameters will update the parameter property values.
		/// </remarks>
		DataSet ExecuteForRead();

		/// <summary>
		/// Executes a write command and saves data to the data source.
		/// </summary>
		/// <remarks>
		/// Output parameters will update the parameter property values.
		/// </remarks>
		void ExecuteForWrite();
		#endregion
	}
}